package indi.kider.server.applandlord.service.related;

import indi.kider.common.model.bill.*;
import indi.kider.common.model.meter.CommandResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import pers.vankid.common.model.base.CommonResponse;
import pers.vankid.common.utils.page.PageRequest;

@FeignClient(value = "balance-bill")
public interface BalanceBill {

    @PostMapping("bill/employee/rent-bill")
    CommonResponse getRentBillCountPage(@RequestBody PageRequest<RentBillCountQuery> request);


    @PostMapping("bill/employee")
    CommonResponse getEnterpriseBills(@RequestBody PageRequest<RentBillCountQuery> request);

    @GetMapping("/bill/month-count/now")
    CommonResponse getEmployeeBillCountNow();

    @PostMapping("bill/month-count/list")
    CommonResponse getEmployeeBillCountPage(@RequestBody PageRequest<String> request);

    @PutMapping("meter/command")
    CommonResponse<CommandResponse> meterControl(@RequestBody MeterControl meterControl);

    @PostMapping("meter/list")
    CommonResponse getRentMeterList(@RequestBody PageRequest<RentMeter> request);

    @PostMapping("meter/record/list")
    CommonResponse getMeterRecordList(@RequestBody PageRequest<RentMeter> request);

    @PostMapping("reading/mannal")
    CommonResponse mannalRead(@RequestBody MeterReadingQuery meterReadingQuery);

    @PutMapping("task/bill/all")
    CommonResponse<String> leaseBalance(@RequestBody BillLeaseCancel billLeaseCancel);

    @GetMapping("bill/total/title/{rentId}")
    CommonResponse getTenantBillFinalCount(@PathVariable(value = "rentId") Long rentId);

    @PostMapping("bill")
    CommonResponse add(@RequestBody Bill bill);

    @PostMapping("bill/list")
    CommonResponse query(@RequestBody PageRequest<Bill> request);
}
